<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>订单详情</title>
    <link rel="stylesheet" href="/static/css/weui.min.css"/>
	<link rel="stylesheet" href="/static/css/style.css"/>
	<script data-main="/static/js/app/order-detail" src="/static/js/lib/require.js" defer async="true"></script>
    <style>
		.weui-media-box {
			padding: 1px;
		}
		.weui-cell:before{
			border-top: 0px solid #e5e5e5;
		}
	</style>
</head>

<body>
	<header class="wy-header">
	    <div class="wy-header-icon-back"><a href="javascript:window.history.back();"></a></div>
	    <div class="wy-header-title">订单详情</div>
		<div class="wy-header-icon-index"><a href="/zshop/"></a></div>
	</header>

	<div class="weui-tab__panel" style="padding-top:41px">
		<div class="weui-cells" style="margin-top:0px;" >
			<div class="weui-cell" style="padding: 5px 15px;">
				<div class="weui-cell__bd">
					<p style="font-size:14px;">订单状态 <span style="color:gray;margin-left: 31px;"> {{order.statusName}}</span></p>
				</div>
			</div>
			<div class="weui-cell" style="padding: 5px 15px;">
				<div class="weui-cell__bd">
					<p style="font-size:14px;">下单时间 <span style="color:gray;margin-left: 31px;"> {{order.createdAtFormat}}</span></p>
				</div>
			</div>
		</div>

		<div class="weui-cells" style="margin-top:10px;" >
			<div class="weui-cell" style="padding: 5px 15px;">
				<div class="weui-cell__bd">
					<p style="font-size:14px;">配送方式 <span style="color:gray;margin-left: 31px;"> {{order.deliveryTypeName}}</span></p>
				</div>
			</div>
			<div class="weui-cell" style="padding: 5px 15px;">
				<div class="weui-cell__bd">
					<p style="font-size:14px;">收件人名 <span style="color:gray;margin-left: 31px;"> {{order.recipient}} {{order.recipientPhone}}</span></p>
				</div>
			</div>
			<div class="weui-cell" style="padding: 5px 15px;">
				<div class="weui-cell__bd">
					<p style="font-size:14px;">收件地址 <span style="color:gray;margin-left: 31px;"> {{order.province}}{{order.city}}{{order.area}}{{order.address}}</span></p>
				</div>
			</div>
			<div class="weui-cell" style="padding: 5px 15px;">
				<div class="weui-cell__bd">
					<p style="font-size:14px;">快递公司 <span style="color:gray;margin-left: 31px;"> {{order.expressCompany}}</span></p>
				</div>
			</div>
			<div class="weui-cell" style="padding: 5px 15px;">
				<div class="weui-cell__bd">
					<p style="font-size:14px;">快递单号 <span style="color:gray;margin-left: 31px;"> {{order.expressNumber}}</span></p>
				</div>
			</div>
			<div class="weui-cell" style="padding: 5px 15px;">
				<div class="weui-cell__bd">
					<p style="font-size:14px;">物流详情 <span style="color:gray;margin-left: 31px;"> 暂无信息</span></p>
				</div>
			</div>
		</div>

		<input type="hidden" id="orderId" name="orderId" value="{{order.id}}"/>

		<div class="weui-panel weui-panel_access" >
			<div class="weui-panel__bd">
				{% for op in opArr %}
				<a href="/zshop/prodDetail/{{op.prodId}}" class="weui-media-box weui-media-box_appmsg weui-cell_access">
					<div class="weui-media-box__hd" style="width:92px;height:92px;">
						<img class="weui-media-box__thumb" src="{{op.image}}" alt="">
					</div>
					<div class="weui-media-box__bd">
						<h4 class="weui-media-box__title" style="font-size:14px;margin-bottom:5px;">{{op.name}}</h4>
						<p class="weui-media-box__desc" style="font-size:14px;margin-bottom:10px;-webkit-line-clamp:1;">{{op.attriValueStr}}</p>
						<p class="weui-media-box__desc" style="font-size:14px;color:red;">¥{{op.price}}</p>
					</div>
					<div class="weui-media-box__bd" >
						<div style="float:right;">
							<p style="font-size:15px;color: #999;margin-right:20px;">x{{op.count}}</p>
						</div>
					</div>
				</a>
				{% endfor %}
			</div>
		</div>

		<div class="weui-cells weui-cells_form" style="margin-top:10px;" >
			<div class="weui-cell" style="padding: 5px 15px;">
				<div class="weui-cell__bd">
					<p style="font-size:14px;">商品金额 <span style="color:red;margin-left: 31px;"> ¥{{order.prodPrice}}</span></p>
				</div>
			</div>
			<div class="weui-cell" style="padding: 5px 15px;">
				<div class="weui-cell__bd">
					<p style="font-size:14px;">物流运费 <span style="color:red;margin-left: 31px;"> + ¥{{order.deliveryFee}}</span></p>
				</div>
			</div>
			<div class="weui-cell" style="padding: 5px 15px;">
				<div class="weui-cell__bd">
					<p style="font-size:14px;">总的金额 <span style="color:red;margin-left: 31px;"> ¥{{order.totalPrice}}</span></p>
				</div>
			</div>
			
			<div class="weui-btn-area" style="margin-top:5px;margin-bottom: 7px;">
				{% if order.status == 1 or order.status == 2 %}
				<a class="weui-btn weui-btn_primary" href="javascript:void(0);" id="wePayBtn" style="font-size: 14px;height:39px;"><i id="payLoading"></i>微信支付</a>
				<a class="weui-btn weui-btn_default" href="javascript:void(0);" id="cancelBtn" style="font-size: 14px;height:39px;"><i id="cancelLoading"></i>取消订单</a>
				{% elif order.status == 3 %}
				<a class="weui-btn weui-btn_primary" href="javascript:void(0);" id="reminderBtn" style="font-size: 14px;height:39px;"><i id="reminderLoading"></i>提醒发货</a>
				{% elif order.status == 4 %}
				<a class="weui-btn weui-btn_primary" href="javascript:void(0);" id="confirmBtn" style="font-size: 14px;height:39px;"><i id="confirmLoading"></i>确认收货</a>
				{% elif order.status == 5 %}
				<a class="weui-btn weui-btn_primary" href="javascript:void(0);" id="evaluateBtn" style="font-size: 14px;height:39px;"><i id="evaluateLoading"></i>去评价</a>
				{% elif order.status == 6 %}
				<a class="weui-btn weui-btn_primary" href="javascript:void(0);" id="delBtn" style="font-size: 14px;height:39px;"><i id="delLoading"></i>删除</a>
				{% endif %}
			</div>
		</div>

	</div>
	{% include "public-tip.html" %}
</body>
</html>
